Crate near_vm_logic[][src]

Expand description

near-vm-logic

This crate implements the specification of the interface that Near blockchain exposes to the smart contracts. It is not dependent on the specific way the smart contract code is executed, e.g. through Wasmer or whatnot, and therefore can be used for unit tests in smart contracts.

Note, this logic assumes the little endian byte ordering of the memory used by the smart contract.

Run tests

cargo test --features mocks

Re-exports

pub use types::ReturnData;
pub use gas_counter::with_ext_cost_counter;

Modules

Structs

Context for the contract execution.

Describes limits for VM and Runtime. TODO #4139: consider switching to strongly-typed wrappers instead of raw quantities

Configuration of view methods execution, during which no costs should be charged.

Enums

Strongly-typed representation of the fees for counting.

Traits

An external blockchain interface for the Runtime logic

An abstraction over the memory of the smart contract.

Logical pointer to a value in storage. Allows getting value length before getting the value itself. This is needed so that runtime can charge gas before accessing a potentially large value.

Type Definitions